package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the per_ret_w_alt database table.
 * 
 */
@Entity
@Table(name="per_ret_w_alt")
@NamedQuery(name="PerRetWAlt.findAll", query="SELECT p FROM PerRetWAlt p")
public class PerRetWAlt implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int altid;

	private String altfw;

	private Timestamp altmaxtime;

	private Timestamp altmintime;

	private int altnum;

	private int altsg;

	private String altstat;

	//bi-directional many-to-one association to PerRetDem
	@OneToMany(mappedBy="perRetWAlt")
	private List<PerRetDem> perRetDems;

	//bi-directional many-to-one association to PerPmsDept
	@ManyToOne
	@JoinColumn(name="DEPTID")
	private PerPmsDept perPmsDept;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="EMPID")
	private PerPmsEmp perPmsEmp1;

	//bi-directional many-to-one association to PerPmsEmp
	@ManyToOne
	@JoinColumn(name="PER_EMPID")
	private PerPmsEmp perPmsEmp2;

	//bi-directional many-to-one association to PerPmsPot
	@ManyToOne
	@JoinColumn(name="POTID")
	private PerPmsPot perPmsPot;

	//bi-directional many-to-one association to PerPmsZJnxx
	@ManyToOne
	@JoinColumn(name="JNXXID")
	private PerPmsZJnxx perPmsZJnxx;

	//bi-directional many-to-one association to PerRetRfs
	@ManyToOne
	@JoinColumn(name="RFSID")
	private PerRetRfs perRetRf;

	public PerRetWAlt() {
	}

	public int getAltid() {
		return this.altid;
	}

	public void setAltid(int altid) {
		this.altid = altid;
	}

	public String getAltfw() {
		return this.altfw;
	}

	public void setAltfw(String altfw) {
		this.altfw = altfw;
	}

	public Timestamp getAltmaxtime() {
		return this.altmaxtime;
	}

	public void setAltmaxtime(Timestamp altmaxtime) {
		this.altmaxtime = altmaxtime;
	}

	public Timestamp getAltmintime() {
		return this.altmintime;
	}

	public void setAltmintime(Timestamp altmintime) {
		this.altmintime = altmintime;
	}

	public int getAltnum() {
		return this.altnum;
	}

	public void setAltnum(int altnum) {
		this.altnum = altnum;
	}

	public int getAltsg() {
		return this.altsg;
	}

	public void setAltsg(int altsg) {
		this.altsg = altsg;
	}

	public String getAltstat() {
		return this.altstat;
	}

	public void setAltstat(String altstat) {
		this.altstat = altstat;
	}

	public List<PerRetDem> getPerRetDems() {
		return this.perRetDems;
	}

	public void setPerRetDems(List<PerRetDem> perRetDems) {
		this.perRetDems = perRetDems;
	}

	public PerRetDem addPerRetDem(PerRetDem perRetDem) {
		getPerRetDems().add(perRetDem);
		perRetDem.setPerRetWAlt(this);

		return perRetDem;
	}

	public PerRetDem removePerRetDem(PerRetDem perRetDem) {
		getPerRetDems().remove(perRetDem);
		perRetDem.setPerRetWAlt(null);

		return perRetDem;
	}

	public PerPmsDept getPerPmsDept() {
		return this.perPmsDept;
	}

	public void setPerPmsDept(PerPmsDept perPmsDept) {
		this.perPmsDept = perPmsDept;
	}

	public PerPmsEmp getPerPmsEmp1() {
		return this.perPmsEmp1;
	}

	public void setPerPmsEmp1(PerPmsEmp perPmsEmp1) {
		this.perPmsEmp1 = perPmsEmp1;
	}

	public PerPmsEmp getPerPmsEmp2() {
		return this.perPmsEmp2;
	}

	public void setPerPmsEmp2(PerPmsEmp perPmsEmp2) {
		this.perPmsEmp2 = perPmsEmp2;
	}

	public PerPmsPot getPerPmsPot() {
		return this.perPmsPot;
	}

	public void setPerPmsPot(PerPmsPot perPmsPot) {
		this.perPmsPot = perPmsPot;
	}

	public PerPmsZJnxx getPerPmsZJnxx() {
		return this.perPmsZJnxx;
	}

	public void setPerPmsZJnxx(PerPmsZJnxx perPmsZJnxx) {
		this.perPmsZJnxx = perPmsZJnxx;
	}

	public PerRetRfs getPerRetRf() {
		return this.perRetRf;
	}

	public void setPerRetRf(PerRetRfs perRetRf) {
		this.perRetRf = perRetRf;
	}

}